Show:

Q scrollbarsAutoHide Class

jQuery plugin for automatically hiding scrollbars on 'overflow: scroll' or 'overflow: auto' elements when mouse cursor is not over them. Usable on desktop browsers for not overloading interface with unneeded visual elements (such as scrollbars) if there are lot of scrollable areas.

Constructor

Q scrollbarsAutoHide

(
  • [Object_or_String]
)

Parameters:

  • [Object_or_String] Mixed optional

    function could have String or Object parameter

    • [Object] Object optional

      If an object then it's a hash of options, that can include:

      • [scrollbarPadding] Boolean optional
        Boolean which indicates whether to preserve padding in a container based on scrollbar width. Padding preserved on the right side (for vertical scrolling) or on the bottom side (for horizontal scrolling).
      • [showHandler] Q.Event optional
        callback which is called when scrollbar is just shown.
      • [hideHandler] Q.Event optional
        callback which is called when scrollbar is just hidden.
    • [String] String optional

      If a string then it's a command and it can have following values: "remove": Removes the plugin functionality so the container won't hide its scrollbars automatically anymore.

Item Index

Methods

remove

()

Removes the scrollbarsAutoHide functionality from the element

scrollIndicators

(
  • [Object_or_String]
)

Makes shadows at the top and bottom of the scrollable area which indicates that scrolling is possible in these directions. Automatically dissappears when no scrolling is possible in that direction.

Parameters:

  • [Object_or_String] Mixed optional

    function could have String or Object parameter

    • [Object] Object optional

      If an Object, then it's a hash of options, that can include:

      • [type] String optional
        Type of scroller to which scroll indicators will be bound. Can be either 'iScroll', 'touchscroll', 'scroller' or 'native'. 'iScroll', 'touchscroll' and 'scroller' are corresponding jQuery plugins while 'native' means that scroll indicators consider native browser scrolling availability as a condition to show them (useful when indicators applied to whole natively-scrolled document).
      • [scroller] String optional
        Object of the scroller. For 'iScroll' type this is exact iScroll instance, for 'scroller' this is jQuery object on which $.fn.scroller was previously called.
      • [scroller] String optional
        Affects indicators positioning and should depend on scroll direction of container element. Can be value of 'v' or 'h'. Defaults to 'v'. On 'v' indicators are place at the top and bottom and on 'h' they are placed at the left and right. Optional.
      • [startClass] String optional
        css class for indicator on the top or left (depending on scroll orientation). May be used to change shadow image (background) and other styles. Optional.
      • [endClass] String optional
        css class for indicator on the bottom or right (depending on scroll orientation). May be used to change shadow image (background) and other styles. Optional.
      • [fadeTime] Number optional
        Time to fadeIn / fadeOut for indicators. If set to zero, indicators will appear immediately.
    • [String] String optional

      If a string, then it's a command which may be: "remove": Destroys plugin so scroll indicators won't be shown anymore.